package com.wosai.medical.hospital.demo.controller.health;

import com.wosai.medical.hospital.demo.controller.BaseController;
import com.wosai.medical.hospital.demo.controller.basic.response.HospitalInfo;
import com.wosai.medical.hospital.demo.controller.basic.response.PatientInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;

/**
 * 医院信息
 *
 * @author yangyong
 * @version 1.0
 * @date 2019/11/22 6:10 下午
 **/
@Slf4j
@Api(tags = "系统健康检查")
@RestController
@RequestMapping("/hospital")
public class HealthController extends BaseController {

    /**
     * 1.1. 医院信息
     *
     * @param apiAppId   接入账号
     * @param apiVersion 接口版本号
     * @param apiStamp   时间戳
     * @param apiSign    参数签名
     * @return 获取医院信息
     */
    @GetMapping("/health/check")
    @ApiOperation("1.1.医院信息")
    public RespResult<Serializable> getHospitalInfo(
            //接入账号(app_id)
            @RequestHeader("api_app_id") final String apiAppId,
            //接口版本号(采用正整数描述)
            @RequestHeader("api_version") final Integer apiVersion,
            //时间戳(13位到毫秒)
            @RequestHeader("api_stamp") final Long apiStamp,
            //参数签名
            @RequestHeader("api_sign") final String apiSign
    ) {
        return action(new Process<Serializable>() {
            @Override
            public String getAppId() {
                return apiAppId;
            }

            @Override
            public Integer getVersion() {
                return apiVersion;
            }

            @Override
            public Long getStamp() {
                return apiStamp;
            }

            @Override
            public String getSign() {
                return apiSign;
            }

            @Override
            public Serializable handler() {
                ///TODO: 业务处理
                return null;
            }
        });
    }
}
